<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let a ='010-12345678';
        let b = '0418-12345678';
        function benDi(number) {
            var reg = (/^010+\-{1}\d+/)
            // var reg = (/^\d+\-{1}\d+/)
            var i = reg.test(number);
            return(i)
        }
        console.log(benDi(a))
        console.log(benDi(b))
    </script>
</body>
</html>